﻿using NExt.util;
using NExt.Core.Model.Base;

namespace NExt.grid
{
    //TODO: Test
    public class GridView : GridView<GridViewEvents>
    {
    }

    public abstract class GridView<TEvents>: Observable<TEvents>
        where TEvents : GridViewEvents, new()
    {
        public bool? autoFill { get; set; }
        public string emptyText { get; set; }
        public bool? enableRowBody { get; set; }
        public bool? forceFit { get; set; }
    }

    public class GridViewEvents : ObservableEvents
    {
        public IScript beforerefresh { get; set; }
        public IScript beforerowremoved { get; set; }
        public IScript beforerowsinserted { get; set; }
        public IScript refresh { get; set; }
        public IScript rowremoved { get; set; }
        public IScript rowsinserted { get; set; }
        public IScript rowupdated { get; set; }
    }
}
